<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .play-ground {
            width: 600px;
            height: 300px;
            border: 1px solid black;
            position: relative;
            transform-style: preserve-3d;
            perspective: 1000px;
        }
        
        .ball {
            border-radius: 50%;
            background-color: aqua;
            position: absolute;
            animation: ball 8s infinite;
            backface-visibility: visible;
            animation-direction: alternate;
        }
        
        @keyframes ball {
            
            from {
                /*起始start样式，0%亦可写作from*/
                width: 150px;
                height: 150px;
                left: 30px;
                top: 130px;
            }

            25% {
                /*内部第一个关键帧keyframe1样式，24%是根据图示的估计值*/
                width: 25px;
                height: 25px;
                left: 130px;
                top: 20px;
                background-color: blueviolet;
                transform: rotateX(45deg);
            }

            50% {
                /*keyframe2 样式*/
                height: 100px;
                width: 100px;
                left: 240px;
                top: 100px;
                background-color: pink;
                transform: rotateX(90deg);
            }

            75% {
                /*keyframe3 样式*/
                height: 100px;
                width: 100px;
                left: 360px;
                top: 200px;
                background-color: green;
                transform: rotateX(135deg);
            }

            to {
                /*end结束样式,100%亦可写作to*/
                width: 150px;
                height: 150px;
                left: 420px;
                top: 70px;
                background-color: rgb(255, 255, 255);
                transform: rotateX(180deg);
            }

        }
    </style>
</head>

<body>
    <div class="play-ground">
        <div class="ball">

        </div>
    </div>
</body>

</html>